<%@page import="tx.bj12320.model.*" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
<%@ include file="/commons/taglibs.jsp" %>

<rapid:override name="head">
	<title><%=DocInfo.TABLE_ALIAS%> 维护</title>

	<link href="<c:url value="/widgets/simpletable/simpletable.css"/>" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<c:url value="/widgets/simpletable/simpletable.js"/>"></script>

	<script type="text/javascript" >
		$(document).ready(function() {
			// 分页需要依赖的初始化动作
			window.simpleTable = new SimpleTable('queryForm',${page.thisPageNumber},${page.pageSize},'${pageRequest.sortColumns}');
		});
	</script>
</rapid:override>

<rapid:override name="content">
	<form id="queryForm" name="queryForm" action="<c:url value="/pages/DocInfo/list.do"/>" method="post" style="display: inline;">
	<div class="queryPanel">
		<fieldset>
			<legend>搜索</legend>
			<table>
				<tr>
					<td class="tdLabel"><%=DocInfo.ALIAS_DOC_INFO_TYPE%></td>
					<td>
						<input value="${query.docInfoType}" id="docInfoType" name="docInfoType" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_TITLE%></td>
					<td>
						<input value="${query.title}" id="title" name="title" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_DOC_NUM%></td>
					<td>
						<input value="${query.docNum}" id="docNum" name="docNum" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_DOC_SORT%></td>
					<td>
						<input value="${query.docSort}" id="docSort" name="docSort" maxlength="500"  class=""/>
					</td>
				</tr>
				<tr>
					<td class="tdLabel"><%=DocInfo.ALIAS_BW_DATE%></td>
					<td>
						<input value="<fmt:formatDate value='${query.bwDateBegin}' pattern='<%=DocInfo.FORMAT_BW_DATE%>'/>" onclick="WdatePicker({dateFmt:'<%=DocInfo.FORMAT_BW_DATE%>'})" id="bwDateBegin" name="bwDateBegin"   />
						<input value="<fmt:formatDate value='${query.bwDateEnd}' pattern='<%=DocInfo.FORMAT_BW_DATE%>'/>" onclick="WdatePicker({dateFmt:'<%=DocInfo.FORMAT_BW_DATE%>'})" id="bwDateEnd" name="bwDateEnd"   />
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_ZW_UNIT%></td>
					<td>
						<input value="${query.zwUnit}" id="zwUnit" name="zwUnit" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_NG_PERSON%></td>
					<td>
						<input value="${query.ngPerson}" id="ngPerson" name="ngPerson" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_ZS_UNIT%></td>
					<td>
						<input value="${query.zsUnit}" id="zsUnit" name="zsUnit" maxlength="500"  class=""/>
					</td>
				</tr>
				<tr>
					<td class="tdLabel"><%=DocInfo.ALIAS_INFO_GKSX%></td>
					<td>
						<input value="${query.infoGksx}" id="infoGksx" name="infoGksx" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_BYGKYY%></td>
					<td>
						<input value="${query.bygkyy}" id="bygkyy" name="bygkyy" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_BMQX%></td>
					<td>
						<input value="${query.bmqx}" id="bmqx" name="bmqx" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_DMYJ%></td>
					<td>
						<input value="${query.dmyj}" id="dmyj" name="dmyj" maxlength="500"  class=""/>
					</td>
				</tr>
				<tr>
					<td class="tdLabel"><%=DocInfo.ALIAS_MJ%></td>
					<td>
						<input value="${query.mj}" id="mj" name="mj" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_KEYWORD%></td>
					<td>
						<input value="${query.keyword}" id="keyword" name="keyword" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_ZBBM%></td>
					<td>
						<input value="${query.zbbm}" id="zbbm" name="zbbm" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_YS%></td>
					<td>
						<input value="${query.ys}" id="ys" name="ys" maxlength="500"  class=""/>
					</td>
				</tr>
				<tr>
					<td class="tdLabel"><%=DocInfo.ALIAS_SWRQ%></td>
					<td>
						<input value="<fmt:formatDate value='${query.swrqBegin}' pattern='<%=DocInfo.FORMAT_SWRQ%>'/>" onclick="WdatePicker({dateFmt:'<%=DocInfo.FORMAT_SWRQ%>'})" id="swrqBegin" name="swrqBegin"   />
						<input value="<fmt:formatDate value='${query.swrqEnd}' pattern='<%=DocInfo.FORMAT_SWRQ%>'/>" onclick="WdatePicker({dateFmt:'<%=DocInfo.FORMAT_SWRQ%>'})" id="swrqEnd" name="swrqEnd"   />
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_JJCD%></td>
					<td>
						<input value="${query.jjcd}" id="jjcd" name="jjcd" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_QFR%></td>
					<td>
						<input value="${query.qfr}" id="qfr" name="qfr" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_HQ_UNIT%></td>
					<td>
						<input value="${query.hqUnit}" id="hqUnit" name="hqUnit" maxlength="500"  class=""/>
					</td>
				</tr>
				<tr>
					<td class="tdLabel"><%=DocInfo.ALIAS_LW_UNIT%></td>
					<td>
						<input value="${query.lwUnit}" id="lwUnit" name="lwUnit" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_DOC_NAME%></td>
					<td>
						<input value="${query.docName}" id="docName" name="docName" maxlength="500"  class=""/>
					</td>
					<td class="tdLabel"><%=DocInfo.ALIAS_DOC_FILE_NAME%></td>
					<td>
						<input value="${query.docFileName}" id="docFileName" name="docFileName" maxlength="500"  class=""/>
					</td>
				</tr>
			</table>
		</fieldset>
		<div class="handleControl">
			<input type="submit" class="stdButton" style="width:80px" value="查询" onclick="getReferenceForm(this).action='${ctx}/pages/DocInfo/list.do'"/>
			<input type="submit" class="stdButton" style="width:80px" value="新增" onclick="getReferenceForm(this).action='${ctx}/pages/DocInfo/create.do'"/>
			<input type="button" class="stdButton" style="width:80px" value="删除" onclick="batchDelete('${ctx}/pages/DocInfo/delete.do','items',document.forms.queryForm)"/>
		<div>
	</div>

	<div class="gridTable">

		<simpletable:pageToolbar page="${page}">
		</simpletable:pageToolbar>

		<table width="100%"  border="0" cellspacing="0" class="gridBody">
		  <thead>

			  <tr>
				<th style="width:1px;"> </th>
				<th style="width:1px;"><input type="checkbox" onclick="setAllCheckboxState('items',this.checked)"></th>

				<!-- 排序时为th增加sortColumn即可,new SimpleTable('sortColumns')会为tableHeader自动增加排序功能; -->
				<th sortColumn="DOC_INFO_TYPE" ><%=DocInfo.ALIAS_DOC_INFO_TYPE%></th>
				<th sortColumn="TITLE" ><%=DocInfo.ALIAS_TITLE%></th>
				<th sortColumn="DOC_NUM" ><%=DocInfo.ALIAS_DOC_NUM%></th>
				<th sortColumn="DOC_SORT" ><%=DocInfo.ALIAS_DOC_SORT%></th>
				<th sortColumn="BW_DATE" ><%=DocInfo.ALIAS_BW_DATE%></th>
				<th sortColumn="ZW_UNIT" ><%=DocInfo.ALIAS_ZW_UNIT%></th>
				<th sortColumn="NG_PERSON" ><%=DocInfo.ALIAS_NG_PERSON%></th>
				<th sortColumn="ZS_UNIT" ><%=DocInfo.ALIAS_ZS_UNIT%></th>
				<th sortColumn="INFO_GKSX" ><%=DocInfo.ALIAS_INFO_GKSX%></th>
				<th sortColumn="BYGKYY" ><%=DocInfo.ALIAS_BYGKYY%></th>
				<th sortColumn="BMQX" ><%=DocInfo.ALIAS_BMQX%></th>
				<th sortColumn="DMYJ" ><%=DocInfo.ALIAS_DMYJ%></th>
				<th sortColumn="MJ" ><%=DocInfo.ALIAS_MJ%></th>
				<th sortColumn="KEYWORD" ><%=DocInfo.ALIAS_KEYWORD%></th>
				<th sortColumn="ZBBM" ><%=DocInfo.ALIAS_ZBBM%></th>
				<th sortColumn="YS" ><%=DocInfo.ALIAS_YS%></th>
				<th sortColumn="SWRQ" ><%=DocInfo.ALIAS_SWRQ%></th>
				<th sortColumn="JJCD" ><%=DocInfo.ALIAS_JJCD%></th>
				<th sortColumn="QFR" ><%=DocInfo.ALIAS_QFR%></th>
				<th sortColumn="HQ_UNIT" ><%=DocInfo.ALIAS_HQ_UNIT%></th>
				<th sortColumn="LW_UNIT" ><%=DocInfo.ALIAS_LW_UNIT%></th>
				<th sortColumn="DOC_NAME" ><%=DocInfo.ALIAS_DOC_NAME%></th>

				<th>操作</th>
			  </tr>

		  </thead>
		  <tbody>
		  	  <c:forEach items="${page.result}" var="item" varStatus="status">

			  <tr class="${status.count % 2 == 0 ? 'odd' : 'even'}">
				<td>${page.thisPageFirstElementNumber + status.index}</td>
				<td><input type="checkbox" name="items" value="docInfoId=${item.docInfoId}&"></td>

				<td><c:out value='${item.docInfoType}'/>&nbsp;</td>
				<td><c:out value='${item.title}'/>&nbsp;</td>
				<td><c:out value='${item.docNum}'/>&nbsp;</td>
				<td><c:out value='${item.docSort}'/>&nbsp;</td>
				<td><c:out value='${item.bwDateString}'/>&nbsp;</td>
				<td><c:out value='${item.zwUnit}'/>&nbsp;</td>
				<td><c:out value='${item.ngPerson}'/>&nbsp;</td>
				<td><c:out value='${item.zsUnit}'/>&nbsp;</td>
				<td><c:out value='${item.infoGksx}'/>&nbsp;</td>
				<td><c:out value='${item.bygkyy}'/>&nbsp;</td>
				<td><c:out value='${item.bmqx}'/>&nbsp;</td>
				<td><c:out value='${item.dmyj}'/>&nbsp;</td>
				<td><c:out value='${item.mj}'/>&nbsp;</td>
				<td><c:out value='${item.keyword}'/>&nbsp;</td>
				<td><c:out value='${item.zbbm}'/>&nbsp;</td>
				<td><c:out value='${item.ys}'/>&nbsp;</td>
				<td><c:out value='${item.swrqString}'/>&nbsp;</td>
				<td><c:out value='${item.jjcd}'/>&nbsp;</td>
				<td><c:out value='${item.qfr}'/>&nbsp;</td>
				<td><c:out value='${item.hqUnit}'/>&nbsp;</td>
				<td><c:out value='${item.lwUnit}'/>&nbsp;</td>
				<td><a href="<c:url value="/doc-info-files/"/><c:out value="${item.docFileName}" />"><c:out value='${item.docName}'/></a>&nbsp;</td>
				<td>
					<a href="${ctx}/pages/DocInfo/show.do?docInfoId=${item.docInfoId}&">查看</a>&nbsp;&nbsp;&nbsp;
					<a href="${ctx}/pages/DocInfo/edit.do?docInfoId=${item.docInfoId}&">修改</a>
				</td>
			  </tr>

		  	  </c:forEach>
		  </tbody>
		</table>

		<simpletable:pageToolbar page="${page}">
		</simpletable:pageToolbar>
	</div>
	</form>
</rapid:override>

<%-- jsp模板继承,具体使用请查看: http://code.google.com/p/rapid-framework/wiki/rapid_jsp_extends --%>
<%@ include file="base.jsp" %>

